<div id="ou-region0">
    <ol class="ou-ancestors" id="rise-breadcrumb">
        <li><a href="http://library.open.ac.uk">OU Library Services</a></li>
        <li><a href="/rise/">MyRecommendations</a></li>
        <li id="results-breadcrumb" style="display:none;"></li>
        <li style="float:right;background:none;"><a href="/rise/?page=FAQ">FAQ</a></li>
        <li style="float:right;background:none;"><a href="/rise/?page=privacy">Privacy Policy</a></li>
        <li style="float:right;background:none;"><a href="http://www.surveymonkey.com/s/7LHF7XH" target="_blank">Feedback</a></li>
        <li style="float:right;background:none;"><a id="new-search" href="#">New Search</a></li>
    </ol>
    <form id="rise-search-form" action="" method="get">
    <fieldset class="rise-search">
        <legend>Search Resources:</legend>
        <input type="text" name="query" id="query" value="<?php echo $_GET['query'] ?>" style="width:400px"/>&nbsp;&nbsp;&nbsp;in&nbsp;
        <div id="searchBy">
            <input type="radio" id="keywords" value="Keyword" name="searchBy" checked="checked"/><label for="keywords">Keyword</label>
            <input type="radio" id="title" value="Title" name="searchBy"<?php echo ($_GET['searchBy']=="Title"?" checked=\"checked\"":"") ?>/><label for="title">Title</label>
            <input type="radio" id="author" value="Author" name="searchBy"<?php echo ($_GET['searchBy']=="Author"?" checked=\"checked\"":"") ?>/><label for="author">Author</label>
        </div>
        <input type="submit" style="width:100px;font-weight:bold" value="Go"/>
    </fieldset>
    </form>
    <div id="loading" style="display:none;">
        <img src="images/loading.gif" style="width:32px;margin:0 auto;" alt=""/><br/>Loading Search Results...
    </div>
    <div id="rise-search-results"></div>
<?php
    if (!empty($_GET['query']) && !empty($_GET['searchBy'])) { echo "<script type=\"text/javascript\">process_search('',1);</script>\n"; }
    $course_recommendations = get_course_recommendations($user_id,"array",4);
    $relationship_recommendations = get_relationship_recommendations($user_id,"array",4);
    
    if ((count($course_recommendations)>0) && (count($relationship_recommendations)>0)) { $css_class = " adjacent-recommendations"; }
    if (count($course_recommendations)>0) {
        echo "                      <fieldset class=\"course$css_class\">\n";
        echo "                          <legend>People on your course(s) viewed:</legend>\n";
        echo "                          <ol>\n";
        foreach ($course_recommendations as $val) {
            echo "<li><a target=\"_blank\" class=\"course-rec\" rank=\"course_".(++$courserank)."\" id=\"{$val['resource_id']}\"".$val['link'].">".ssreplace(urldecode($val['name']),46)."</a><br/>"
                ."<span class=\"caption\">".$val['ids']."</span></li>\n";
        }
        echo "                          </ol>\n";
        echo "                      </fieldset>\n";
    }
    if (count($relationship_recommendations)>0) {
        echo "                      <fieldset class=\"related$css_class\">\n";
        echo "                          <legend>These resources may be related to others you've viewed recently:</legend>\n";
        echo "                          <ol>\n";
        foreach ($relationship_recommendations as $val) {
            echo "<li><a target=\"_blank\" lvid=\"{$val['origin']}\" rank=\"relationship_".(++$relrank)."\" class=\"rel-rec\" id=\"{$val['id']}\"".generate_link($val['link']).">".urldecode($val['name'])."</a><br/>\n";
            echo "<span class=\"caption\">ISSN: {$val['ISSN']}</span></li>\n";
        }
        echo "                          </ol>\n";
        echo "                      </fieldset>\n";
    }
?>
							<div>
								<a href="http://www.jisc.ac.uk/"><img style="width:102px;float:right;clear:none;border:0;" src="images/jisc_logo.jpg" alt="JISC"/></a>
								<a href="http://www.open.ac.uk/blogs/RISE/"><img style="margin:0 0 10px 10px;border:0;width:407px;display:block;" alt="RISE - Recommendations Improve the Search Experience" src="images/rise_logo.jpg"/></a>
							</div>
                        </div>
                        <div id="ou-region1">
                        </div>
                        <div id="ou-region2">
                        </div>